<template>
	<view class="courseItemItem" @click="goto">
		<view class="item-img flex-grow-0">
			<image :src="item.theoryVideoIcon?item.theoryVideoIcon:'/static/images/pic1.png'" mode="aspectFill"></image>
		</view>
		<view class="item-cont flex-grow-1">
			<view class="name font32">{{item.theoryTitle}}</view>
			<view class="ds">
				{{item.description}}
			</view>
			<view class="label-item">
			学习时间：{{item.learningOften}}分钟
			</view>
			<view class="btn">立即学习</view>
		</view>
	</view>
</template>

<script>
	export default {
		name:"courseItem",
		data() {
			return {
				
			};
		},
		props:{
			item: {
				type: Object,
				default: {}
			},
		},
		methods:{
			goto(){
				uni.navigateTo({
					url:'/technicianPages/courseDetails/courseDetails?theoryId='+this.item.theoryId
				})
			}
		}
	}
</script>

<style lang="less" scoped>
	.courseItemItem {
		width: 100%;
		// height: 210rpx;
		background-color: #ffffff;
		border-radius: 10rpx;
		margin-top: 20rpx;
		display: flex;
		padding: 15rpx;
		box-sizing: border-box;
		position: relative;
		align-items: center;

		.item-img {
			width: 182rpx;
			height: 182rpx;
			background-color: #f6f6f6;
			border-radius: 10rpx;
			background: #f1f1f1;
			margin-right: 23rpx;

			image {
				width: 100%;
				height: 100%;
			}
		}

		.fw {
			position: absolute;
			top: 15rpx;
			right: 30rpx;
			color: #61bfbe;

		}

		.name {
			color: #333;
			font-weight: bold;

		}

		.ds {
			margin: 20rpx 0px;
			color:#666;
			text{
				color: #333;
			}
		}

		.label-item {
			display: flex;
			// padding: 24rpx 0px;

		}

		.btn {
			position: absolute;
			bottom: 30rpx;
			right: 20rpx;
			padding: 0px 14rpx;
			height: 50rpx;
			background-color: #60bcbb;
			border-radius: 25rpx;
			text-align: center;
			line-height: 48rpx;
			color: #fff;

		}
	}

</style>